Fix some issues with numbers.
ARC refactor in XCode 4.2

refactored files to use automatic reference counting
Updated with code from master