Fix bug with Dispose()

Signed-off-by: SharplEr <sharplermc@gmail.com>
Added many comments

Signed-off-by: SharplEr <sharplermc@gmail.com>