Move unit definition to Unit class, and start implementing tests