Fix tests for firefox (reports color differently).
Use dataset where possible.
Use indexOf/slice instead of regex.