refactoring
add finalizer
fix system messages