Separated patch code into smaller, specific files.