Adjusts header and fixes a few issues