Flesh out language optimization algorithm