Josephus problem and namespace fixes