Relatively minor changes and bug fixes