PSR-1 Compliant now, at least the most important parts.  Added DocBlocks where missing.