CS: improve code quality

* add proper docblocks
* add sensible type hints
* remove unused variables
* remove unused methods
* call appropriate parent constructors
* add `use` statements to avoid fully qualified class names
* remove unnecessary `use` statements
* change order of methods: `public`, `protected`, `private`
* add helper methods to access services from the container
* add sensible `return` statements
load JS library for the `Date.format()` method