cleanup and support for extra params