Performance merged

Pull request merging the changes made by Kore in performance branch.