Split handle method into a few different methods. Did some re-naming and commenting.