Fixed buildsystem slightly, started re=implementation of the RTree.