Updated main with libreadline