Implemented size and isEmpty and added unit tests.