Mass refactor and import cleanup!