Final version. Bugs squashed!