Added freeing to release builds.
Cleaned up naming.