Removed pointless variables and cleaned up incorrect PHPDoc