Removed "ifs nesting".