Added some framework for testing, had a lot more trouble than expected with java syntax