Added dt stuff to time.h
Moved initWindow stuff from main() to its own function