Moved header to separate action

Fixed some bugs.