Cleanup; better implementation of template view and model; fixed bug in new post