Reverted to declaring imports and removed some dead code