Chat command, cleaned up some f(), client side Js