Improved parsing

Improved code in parsing function by adding helper method
startsWithUnaryOperator()