Added transaction management to the controller layer