[buffer] Cleanup
[engine] Cleanup
[module] Cleanup and minor refactoring