Ground work to support post previews.
Implemented post previews.
Removed unecessary code.