Fixed number formatting (9) -> -9 and added unit tests for formatting methods

Fixed formatting of negative numbers (no more parenthesis). Added unit tests for format methods. Removed unnecessary checks in padLeft() and padRight().