Core pr 3

It have basically be rewritten and can be seen at http://ding2tal.ting.dk.