Only paste if TextBox is enabled

- Also formatted the code