minor schedule and database changes

tested the schedule class with turn off and dim functions which both now
working as intended. databaseconnector has been updated with more sql
querys for database information collection.
minor database query update