New database class

No reason to reinvent the wheel here, database class credit goes to
github.com/indieteq