Reorganized so that most of devAlpha is contained within functions