Reorganized Den of Theives code