Make methods chainable, fix isEmpty() and add unit tests, fix spacing