Fixed mismatched variables
Corrected comment format
Created functions to display flexible content