More changes.

- Some improvements.
- Added some api features.