debugged reweighting handling during cross_validation
Improved header
Added copyright information
specified behavior in case opt.w = 1