some fixes & stuff
seems to work, more or less