improved token parsing. Added styling