Giant commit that fixes many back-end flaws