Remove unnecessary global usage
Remove redefinitions of variables
Less magick
Don't change current working directory
Bump version -> 0.3.1