Speed improvements and bug fix. Small demo update.