Implement factory to be able to insert pages dynamically.

Change-Id: Ic358a820148670da85a1b374abd08103eaa995de
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>