Refactor and add algorithms to config parser