Code cleanup
- updated deprecated calls
- cleaned up PHPDoc comments