Potential fix for a coffeescript issue and some refactoring
Perl hashes