This work is published as two papers: