Leftovers

Fix upgrade. Cleanup of obsolete functions, name replacements.