Changed a lot of things - did not test them yet. They may not yet work.
I'm working on it.