Horray!

Finally the core algorithm is working o/ \o (ASCII high five)