Core/Script: BWL full rewrite