Adding Minimum Scalar Product problem. Also adding more module
extensions to remove code duplication.