Refactor configuration files and entry scripts