Fix some errors where Location attributes that were removed were still used
Fix some rubocop issues