Updated scripts and added documentation