WIP - delete legacy codes

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