Minor code cleanup

Removed some unnecessary code, and converted a python import.