Casting arguments to int for device
Fix copyleft issue, and slight number formating