fix code for WIN386 target
correct prototypes
cleanup code