Added new features fixed bugs