replace debug module with maven and spring profile, refactor core, test