More bug fixes, rethought session logic.