Initial unfinished work on analysis using Scala