Core code of the Emily Framework