fix coding style for rest handler and add phpdoc, some adjustments, remove midcom request sudo stuff