Modernized Class

Updated the class to work with Xcode 5 and more generic situations than the provided project