updated to include database api server stuff

database added, along with general clean up of code