Fixed some stuff to refactor parser