Some refactoring for process
Merge of changes