ARC'ified and fixed build errors