Added prompt() and commented more of the code