Cleaned up header & footer code

See FB comment, this might mess your stuff up