Minor Code improvements