Cleans up directory structure a bit; and fixes broken tests.