Removed numerical routines and deprecated functions, debugging