Nil options fix

Sets options to empty hash when nil. Includes slight refactoring of let statements.