fixes, changes to code style
use ruby < 1.9 hash syntax