Added math module and errors class