Hacked formatted headers into working

Ugly code; will fix later