Upgraded client lib, fixed potential XSS, fixed some other tiny bugs