Various code update