Cleanup, split client into modules