v0.2. Major optimizations. New API.