Make code more readable, remove some dead code and have goimports fix th...

...e imports