Move declass directory to utils and split out database code