split package into daemon & library part

split package into daemon & library part