Added 'first' and 'last' class support