Intermediate debugging step. Doesn't crash any more (at least as far as it gets right now). This commit is for backup purposes.