Make use of Windows structure for COFF info. Fixed a few issues in COFF loading. Cleaned up the code.