Initial profileswitch code.

Signed-off-by: Kari Hautio <khautio@gmail.com>