added functionality to store lastaction and lastcontroller to array on remote class