Work on 1.7

Functionality is missing, but otherwise it works ok