Add debug flag to app config, wire up Database class