Finished half of the refactoring at 01:40 this morning. Getting ready to start on the good stuff now.