Adapted code to meet PIP8 standanrds
Optimization of code and added more scales