Same NPE fix but this time for every menu there.

This also adds and removes some code to cleanup some more.