This is entierly based on what is done in the CTL project Fixes #10 Change-Id: I3fc27b686a2048d48bb2198cd8439e65d77df659