Simplify/clean up imported modules

* Removes unused sys module
* Imports datetime from datetime
Clarify some debug output