Updated some small code fixes