New methods added. Some bugs fixed.