Added comments and added character encoding