ICANON support (still a bit rough)

This is a massive hack and I admit it.