Functions revamp