slight refactoring to allow for the model to take different directories
[#2]