Initial additions of my own code.