Improved DB Encapsilation slightly

Still needs a lot of work and generalizing.  Solved an issue with mysqli
and binary data.  I will need to write a type enum at some point to get
all the way away from the mysqli interface elements so it is easier to
abstract the system to other databases.