Merge server and client-side

Warning! 💩
Merge