Refactoring / fix bug with parsing expressions as a statement rather than an object