Little bit of code refactor