Done for today, code is still in a messy state, but in should be ready
in few days from now.