Infrastructure fixes

These commits fix the most critical bugs related to building and other infrastructure stuff on master