reorganize files
added initial hack for multiple process support