cleanup constants and defaults