Foxel agent
refactoring