back end work.

- fixed parsing of ID-input
- fixed correct server responses from "create site"
- made documentfactory a singleton