removed unused code
Format fixed
cleaned & commented
cleaned & commented
cleaned & commented
partly cleaned & commented