Document::save now use Document::create or Document::update
CS fixes
Document::setDefaultPortAndHost

- Correct setting default host and port
- Fixed Type Hinting