Abstracted State update and render functions.
Simpler to use and maintain.