Integrating legacy applications