Reorganized a couple methods, removed dead code.