Added support for multiple emitters. Still need to sort export function, though.