Add ability to change push mode

I did some minor cleanup as well.