Added patches which contain the code refactoring