changed definitions to use a map instead of array

- Definition now uses a map, so it can be easily extended.