Small refactors and improves commenting