Miscellaneous cleanup

* Replaced "is not" with "!="
* Cleaned up if-statement trees
* Removed dependency for "time" package