Cleaned up code. Iteration and graphics work now.