Refactored edit source code