Code clenaup

Re-arranged the order of some of the final debug entries, and added a
condition test for the presence of a <star> tag before performing a
string replacement.
Merge branch 'master' of https://github.com/Program-O/Program-O