Removing this else and un-nesting this logic will make it much easier to read.