Updated the rest of the comments
Consolidated code definitions