Added the all the required features and fixed bugs