added next/previous post, fixed some bugs