Capakey gateway

Think this is ready to be merged. 

@maarten-vermeyen any final comments?