Modified coding style, removed unnecessary comments and "offset" key words.