Minor fixes and structure changes.