redoing old pull request. Closes #544 closes #513
Merge pull request #582 from OCHA-DAP/marianne-dev

Merged! A nicer, neater pull request :) Closes #544 closes #513