Correct usage of data and instruction barriers v2

Rebased version of #52 on top of Dan's re-org