Cleaned up maths class