Implemented REST (or something that looks a bit like it).