Minor refactoring. Drawing not currently working, will find out later why.