Refactor a bunch of imports and rename some stuff