Made compable with JAVA 1.6

Only worked for JAV 1.7 and later.
Also added package declaration