Fixed some broken tests, reformatted and reorganized imports on entire
project.