API and webapp fixes