Refactor rename
Tidy indentation
First simple implementation of hooks