Refactor the metaprogramming goodness for persistance.
Merge pull request #4 from tkrajcar/refactor_persisted

Refactor persistance