Changed input from pixel sizes to number of pixels
Removed junk code