Fixed prompt bug, added comments