Initial commit of most of the code.