Improved testing environment and added more tests