[WIP] Use the right type for self in methods and remove obsoleted items.