Could reduce var sizes and use ruby to set to $True/$False to save a few chars.