moved all client code in to client directory