Sets up $date as a global variable and object like $user
removed footer
Slight changes to clean up code