Added an insert column function
Replaced some duplicate code
Added implementation for the eliminate function