Merge "Refactor grain code to remove string handling using bash"