Total overhaul

Big shoutout to Stu. Stu made this possible in the first place, and Stu
single-handedly updated the code this go round. Please, ladies and
gentlemen, give a big round to Stu!