A few more changes to the code