Refactored code, added authorship on code and rename comments in english.