mainly cors / datetime compatibility fixes, file encoding tweaks