added reading of PE header and PE optional header
refactoring