Converted to ARC. Made improvements to modernize it