Moved the mainpage javascript to its own file, fixed a bug where removing the last row from a custom list would remove the ability to add a row