Add final scalar decomposition algorithm and doc cleanup