added explanation message at the top. misc cleaning.
misc cleaning and restructuring.