Encapsulate update and draw into their own functions for readability