Added more consistency to the code