Clean code and improve support for absolute references
Clean code
Change metadata cascading to occur after map merge #1086