Bunch of code changes