Fixed memory leaks, smoothness of rotation, random seeds