Created singleton class.
Bug Fixes.
Fixed .htaccess file name typo.
Updated script to return JSON data.
Cleaned up code a bit.