More work on script.

Decided to use a map instead of arraylist also not adding a lot of error
handling.