converted to the ios6 sdk, misc code cleanup