Some bugs have been fixed and some functions were added.