Fixed a crash...  It does kind of work now, but there's still plenty of bugs.