Fixed database functions, fixed tests, added colors to bash, etc.