Mostly debugged. Still pretty fragile.