Some code cleanup without functional changes

These commits starts to add PHPDOC-style comments to some functions. Additionally it removes the error supressing @-characters and replaces them with a more perfomant isset-check.