Make weight limit frontend functionality more generic