Fix to world setting function

Correctly use booleans in world settings function
Add nil returns and boolean handling fix

Add nil return to statement like methods
Add function for handling 'truthy' booleans in setting methods
Return value when passed non-iterable

Ensure that if function is passed a non-iterable that just return passed in value
Add comment to note that flatten is recursive in Ruby