Refactoring by decoupling view controllers

Refacted the stock edit view controllers to use the delgate pattern to
communicate with the main controller