Math functions in extra file now, reindent simplex.js