Cleaned up and commented shaper.cpp and shaper.hpp