Improved the convert script.
Added AlgorithmTests.