Added timed updates for client-server communication and fixed some bugs.