Version 1.0 relase.
Updated license to BSD-2 style liscence.
Fixed some bugs.