Fix most specs and improve the testing environment

Are these comments important?