Added unit tests for common, bean, and entity classes and took advantage
of refactoring opportunities where possible.