Rewrite clients

Merging next generation of Switchlight with master branch.