Made some more progress. Pretty stuck on the kernel estimation by hand- go ahead on that one if you feel so motivated.