Fixed coding style. 
Minor improvements in abstract factory methods.

Change-Id: Ic6d1de0efede8780ff6d50126b98b50dee5fa5fb