This file has become huge! Time to break it up into multiple files, I think.