Changes to fix bugs and get it working

Also added "Status" information for database.