Some slight mods and JUnit test created