Factor parestimation

and some minor improvements