Refactor and add clarifying comments
Refactor and add clarifying comments

loandy/moxie,loandy/moxie,loandy/moxie,paultag/moxie,paultag/moxie,mileswwatkins/moxie,mileswwatkins/moxie,paultag/moxie,mileswwatkins/moxie