Started workning on slopes
Some refactoring
Merge branch 'master' into slopes
Work on slopes