quick review of the code, need to carefully check rescaling and duplicates removal
Merge branch 'master' of https://github.com/bhaibeka/BCMETA