few minor changes

I made a few minor changes feel free to incorporate if you wish.
You may want to take a look at lines 33 and 56 … I added " 1 1\n" to make it work, but I feel it's a bit hackish