Fixed Material Refs

Added Material referenece using hashmaps, sets, and arraylists