WIP - delete legacy codes

- [ ] Remove Realm related codes.
- [ ] Remove dependencies.