still many bugs, but also some fixes