formatting and whitespace cleanup, in preparation for api updates, enhancements, and cleanup
fixes to get the PHP api working again (curl issues, etc.) and some cleanup before I start refactoring all files