Small bugfixes

Added finalizer

Added licensing statement