Rewrite Number, add unit tests