Use string format.

Signed-off-by: crynobone <crynobone@gmail.com>
Rename some variable.

Signed-off-by: crynobone <crynobone@gmail.com>
Some additional fixes.

Signed-off-by: crynobone <crynobone@gmail.com>