modified post layout and other refactorings