Refactor packages to 'client', 'server' and 'model'