More improvements. Almost there. TODO: Resolve index problems.