More file shuffling and minor code tweaks