Modernize code; ARC enable

Code cleanup (simplify) and modernizing.