Fixed all three "resource leak" warnings

It seems to work but I did not test the code properly (requires glsl shader errors)
On the other hand, I can't see much that could be made wrong.
Fixed typo which lead to the creation of a label
Fixed all warnings of unnecessary throw declaration
Fixed warnings - unnecessary casts (object -> object)
Fixed potential null pointer access warnings

Some make perfect sense while some others don't.
Fixed potential resource leak
Fixed missing serial version IDs

Note that Matrix4i has CR/LF endings.