Cleaned up database controller tool