code cleanup

* unused imports
* useless null checks