Fixes for iOS6 and cleanup constants