Added different behaviours in different files for the ServiceAgent.