Memory allocation progress; refactoring