Fix some initial bugs, create a package for connection.