add source code compiblity to java 6
same refactoring and testing stuff
add tests
fix same issues