Add simpe reference resolving