 
 # Test the parser
 inequation = good[1]
-console.log "\nParsing: #{inequation}\n"
+console.log "\nParsing:\n#{inequation}\n"
 
 tokens = lex inequation
-console.log "Tokens: #{tokens}"
+console.log "Tokens:\n#{tokens}\n"
 
-normalised = normalise_minus_coefficients tokens
-console.log "Normalised minus: #{normalised}"
-
-normalised = normalise_coefficients normalised
-console.log "Normalised coefficients: #{normalised}"
+normalised = normalise_coefficients tokens
+console.log "Normalised coefficients:\n#{normalised}\n"
 
 parsed = parse normalised
-console.log "Parsed: #{parsed}"
-
-console.log parse normalise_coefficients normalise_minus_coefficients tokens
+console.log "Parsed:\n#{parsed}\n"

# Tokens have type and value
class Token
  constructor: (@type, @value) ->

  toString: -> "[#{@type} '#{@value}']"


      return lex consume(input, result), tokens.concat(token)

  throw "Parse error at '#{input}' (tokens: #{tokens}, last token: #{previous})"

# Replace all subtract operators with adds, normalising the coefficeints
normalise_coefficients = (tokens, normalised=[]) ->
