updated structure.

Added footer templates to necessary pages with appropriate class name
and cleaned up code.