Break drawing up into individual functions