Refactored the number system to a simpler api