Phpdoc was cleaned up. Several unneeded conditionals were removed. Code formatting was cleaned up.