Made many changes to the code base