Added some modifications based on the design document