Fixed test compilation errors and some imports