Small refactor + comments