Cleaned up some code, fixed crash when hovering over items and changed to MultiKeyMap in SubstanceRegistry

- Made some of the code more readable (in my opinion)
- Changed generics to use Java 7 specific features (do we want this?)
- Used MultiKeyMap in SubstanceRegistry to avoid looping
- Fixed crash when hovering over items