Implemented logic in class "Number"

It still needs some work.