change settings array to associative array

Proposed changes to fix #15 
Needs testing!