Merge pull request #43 from pgervais/api_cleanup

API cleanup
Merge remote branch 'nisl/master' into mask_optimisation