A Logical Approach to Efficient Max-SAT solving