Fixed crashing bug reported by Teresa Lam. Added tests so that I'm fairly certain that no more crashing bugs exist. Removed a marker for iffy code after understanding that code via test cases.