Changed getIconLocation methods for a general one