Added volatile directive, destructors

Code works
Follow considerations afterwards