fix build scripts
fix some encoding issues + add todos where not sure what to do
fix NPE in BackendFactory