Changed string comparisons to easier != "" syntax