Added a command line wrapper, worked on some write functionality