cleaned up graphics code and refined functions to be usefull, cursor is wip