Giant mess: changed names to include arc in front to avoid name clashes, changed build system from non-rec make to cmake for portability