Large refactoring, replaced Velocity with CodeModel, lots of other changes