Refacture Functions class