Improve the code a little bit

Also refactor remove-brackets command so we dont have to pass event
around