Refactor graphics calls/some cleanup