Make code 1.6 compatible and change target to 1.6