Split reference.md into a bunch of files, add some more docs