Small refactor p1
Small refactor p2