Added readme, fixed standard input, eliminated
superfluous code