Some cleanup of obsolete code