Fix small problems found by phpstorm; Also proper input escaping in documenting server