Little cleanups
Huge refatoring including footer support, fixes #7