Refactor HOME environment variable usage
Refactor some settings