Refactor according to Claudiu and Robert review