Improved api backend and some frontend quirks