Added support for first-child and last-child pseudo classes