Refactor, move comments, update config.