Several changes to cleanup function definitions, basically