Change some calculations and tried to make slopes look decent, not yet
finished.