logic/connect changes

added in some functionality and bugfixes to connect, and some more
functionality to logic