Minor refactoring of dynamic patching code. - Changes naming of manifest properties to be consistent with documentation. - Moves methods from inner class to outer class to make them more reusable.