updated main and gridClass

unhandled exception bug exists :( Shall squash tomorrow