Added tests and fixes to parser.

Footer now handled.