Fixing some maven problem and starting refactoring of server