Some more work on ARC compatibility; cleaned up some source