Added console.readch, console.readln and console.available; refactored
IO-API.