Remove defines, cleanup code, pass frame to draw