Minor Code Fixes