Added simple connect, read and write functions. It is not final version.