Add more file endpoints
Lots of misc fixes