Working and tested version of shaded.cpp, including the extra credit