Fixed unreachable statement
Fixed PHPDoc
Clean up classes and write comments