Added main file
Added database manangement file
Minor changes to make it work