Fixed all makefiles
The Big commit

- Several fixes
- 'Removed' quotes in insert
- Fixed makefile to run with simply make
- Added the check for db_open in all schema and algebra commands
- removed g_db_name and is using g_db_open_flag
- formatting