Bunch of code updates