Need to really clean things up and switch to cmake