Cleaned up database controll tool