Finished database implementation and fixed health bugs