refactored screenLoop
updated performUpdate type
Added a couple of hooks