Refactor systemd target and add test files