Fixed local var hiding global var (sonar major issue)
Hopefully fixing non-transient non-serializable instance field issue for EntitySchema (sonar major issue)
Pass at all code for formatting
Several minor sonar issues fixed
Removed unused imports
Added copyright to some source files