HUGE commit that makes the whole thing work. Have not tested on other machines, but it runs on my Mac.