Moved legacy code and updated affected source files