Reorder imports and cleanup

Fixes issue no.2