Some code changes. Making it more clear and beautiful.