Tidy ups and documentation

It took me a while to figure out how POST searches work, so I tidied it up a bit and added some documentation