Fixed refactor crash, added UI back in