clean up options code