made menu_date unique
factored lots of db stuff out of main script
initial commit of db module