Fixed DB and Added useful code