Moved the SQLalchemy calls to the models

This is more OOP
Massively improve the time slot query