Added output example and fixed known bugs