Made search functional and changed database connection to use config file.