Code clean up
Code clean up + commentaries