Some more changes to the code