Add ACE decomposition function, first commit