fix build scripts
fix some encoding issues + add todos where not sure what to do
fix NPE in BackendFactory
Merge branch 'pu' into otp_libs