Refactoring.

Add methods to entities, fix spring library versions.