Merge pull request #6 from wagnert/master

Refacotor for usage with new persistence container functionality
reformatting to fit coding styles
Merge pull request #7 from wick-ed/master

reformatting to fit coding styles