Refactorings in amberc code