Code review notes
Check memory leaks
TODO: Verify thread safety
