made the whole process totally bootstrappable, and tidied up a few things