Websql refactor

- [x] refactor websql
- [ ] refactor memory
- [ ] specs