Optimize grabbing of first char
Small project cleanup:
* add some phpdocs,
* remove unused variables,
* add missing class variables,
* prefer usage of `is_file()` when possible