Cleaned client side js
Moved controls into own loop and added friction