Replaces the old algorithm with a new one
Merge branch 'master' of github.com:AntonLovmar/ir14
Improves the previous algorithm