Database Working Start

Requires some small modification