adjusted data.php to utilize Exceptions instead of a generic error
logging stub. doing some cleanup before moving over to a TDD format
using PHPUnit.