added some tests. reformatted and optimized imports. updated to java 7.