Refactored to enable preview to work
Fixed tests
Rebased
Merge pull request #13 from sulu-cmf/refactor_for_preview

Refactored to enable preview to work