load input properly, as requested by @Melvar
move getNChar and getLen to IdeSlave
read from handle rather than stdin