Fixes #15
Start to implement #22