Performance improvements and tests.
Added separate package with associative arrays and refactorings.