Added new features and bug fixes