cleanup and setting to some defaults