Added funcs to image resizer and added some comments