Completed clean-up and added the complete solution