Clean up all registry related entrys
format any in the code and remove unused comment.
moved to XML is not full finish yet.
please do not format my formating code or i will stop working on this.