Rewrite

Overhauling the client