Created separate function for parsing parentheses

Moved code for parsing parentheses into separate function for legibility
Evaluating cons

Evaluating cons tests pass
Minor formatting changes

Changed some formatting for consistency