Added controller

Added nextPath() to the controller and use it to step through posts.