Added clock (use to update animations etc.).
Fixed clock update.
Cleaned up some code.
Merge remote-tracking branch 'origin/master' into JesseMOE