Chasing HEAD

This PR contains all changes from #15, #16 and #12