Moved export code to it's own function
Fixed module not beeing placed under Export tab in BO