drop junk in input buffer before entering CLI

this could use some polishing but i think it will do for now
close #21