added new functionality, tweaks for ios6 and new libs