Simple function. Determines if code is balanced

(with regards to parentheses, brackets, etc.)