Cleanup, removes old functions, groups settings together