Working refactor, most console stuff in