First take on itemref parsing

This handles few simple cases, but for complete feature
different approach is needed.