Incremented version number to beta3, plus some basic code tidy-up