Added multiple cmake modules
Fixed reconnection
Updated testprogram