Implemented M9 Design and Streamlined Code