some bugfixes, connection and setup seems to be functional