Initial commit.
Added some special handling if a component falls to 0 weight, just for the webapp cause it's so wrong...