Extensive refactoring, add testing, add build systems for Python, Ruby and Perl implementations
Fix conflict