WIP - many fixes