refactor(*.rs): use slicing syntax, UserDir -> USER_DIR
fix(*.rs): constants now use `const` instead of `static`
Merge pull request #9 from japaric/refactor

Refactor