- remove duplicate code (refactoring)
- complete php-docs