Moved some of the code modifications to %prep