Updated to jdk 1.8 and made compliant to 1.7