Small refactor on read_scheme