Fix PE exports parsing (adapted inisider patch) and some code cleanup