Cleaned up some codes and comments.