refactor configuration handling, move config file to home dir