Major Refactoring of Codes