Major Trimming and Cleaning
Slowly conforming to the template code.