move main() into merc.application