Additional functions added + leak test.