more minor fixes. almost in a working state.