Added changes from fidel branch