Revised air and water implementation and added more test cases.

This is for #21.