Arranged some codes