Improve BRIEF and various tweaks