splitted src to CLI & library