tidied up variables, copies empty string into input buffer after displaying message

Fixes a possible issue where a message would simply overwrite the
characters in the previous message rather than replace.
Adds RR functionality