Improved interface and fixed some bugs

1.0.2