Made more generic
minor changes
Merge pull request #2 from mjm159/master

Made more generic