Rename 'tag' variable to 'version'.
Reorganise build file.