Added finalizers but they only log possible leaks instead of freeing memory. Formatted all files. Moved enums to separate files. Fixed warnings about overriding methods.