Tidied up code and made it so new lines get appended

Made input easier by just clicking terminal window to focus the input