little refactor and add maven compiler plugin to compile to 1.8