A bunch of frontend features

There are a bunch of frontend features in this pull request. Please look at commit messages for more specific information. Basically, the frontend stuff now goes through the backend wherever possible, and the groundwork has been put into place to make the git commands work.