Filter short posts, clean up code