Implement imports() function and other small changes in PE module