Fixes; RAII technique to acquire/release shared resource implementation