Refactored to use IDs and dynamic detection of view classes
Use OS 10.7 SDK for all builds