major refactoring, iOS 6?, reimpl some unsafe code

redid most of the code to fit modern style guides and precautions,
basic iOS 6 support (tintColor), and filtered some of the code to make
more sense (and include relevant comments for the befuddled)