Implemented first version of k-weighted CSP solver