Cleanup, added comments
Cleanup, comments, fix names, added grid indices