Finish basic implementation of normalize function
Complete and debug normalize module.