posts restructured

unit tests passing mostly but the posts class doesn't really have any tests