input name changed and shortered code

weight image -> weight
realign prefix -> prefix