refactor packages and update MasterServerHandler