First commit, with most of the relevant classes.