Removed almost all hard-coded values to be able to accept all images