Version 1.0. Tests added. Documentation fix. Little refactoring.