Added more flexibility for element positioning