Rewrote analyser to return the quantity that has been analysed and created. Continued with support for adding whole script