Make scale service more generic
Improve indentation. Rename modules to something more coherent.