Various fixes and additions.