Lots of changes to frontend as well as backend...should have made this like 10 commits.