Added new functionalities.
Fixed bugs.