Profile switch support (initial)

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