Now verifies necessary data is in the database prior to any execution,
began replacing double quoted strings with single quotes to improve
performance, moved database connection into common_database