Added Cocoapods support and refactoring controllers

Signed-off-by: Julien Bonvarlet <jbonva@gmail.com>