move a lot of code to Inanity for better abstraction of drawing