Adding database back in Main (sorry Sarah!)

Added code to destroy GPS service in TrainingMode although it doesnt
work :(