Added dash and underscore
Added trap for errors
Restructed file to try and fix the github incorrect reporting of
"Javascript" as the language type.