fixes
+ added EXPORT for windows DLL
@ various fixes and changes