Code style.
Add some tests for dynamic_t and fix a bug.