Added buffer struct, insert and remove methods and command line reading.