DB Class Changes - Implement Compatibility file.

Added Compatibility file to Layer, for PHP backwards/future
compatibility. New Database class which allows for more efficient
queries & logging.