refactored tests, fixed bugs in main algorithm, added auto image sequence generator