Bump to 1.3.1. Fixed several bugs, improved WS interface