refactoring and comments for peloader and cofffileheader