Initial commit, working version of what Michael did.