fix some problems, standardize some interfaces