Replaced HashSets with ArrayLists to ensure ordering of Actions