Simplifying functions and adding configuration