2.12 support

Rebased #20 on top of #23 and the 0.1.6-SNAPSHOT branch.