Can you post the whole library sofar?
some tips
- don't do serial output in a library (unless to talk to a sensor)
- put tables in progmem
- try to do all in integer domain (so no floats if possible)
- refactor reusable parts to functions to minimize footprint and stack consumption.