Towards a Generalized and Optimized Apriori Approach