Fixed headers location, refactoring.