Last changes

Simplifying `scraps` code: removing unused classes and replacing with
functions.