Small code changes

Here are some small code changes