Math module and tests