Add resizing.
Add js unit tests.