Minor fixes to index calculation
add insert() helper function
Merge branch 'master' of github.com:Nektar-io/projectX