Finalize the setting function and hook it up with inner logic.
remove unnecessary files