Cleaner code, fixed documentation and added unit tests for Collection behavior