added micropost tests and tiny refactor