Switching the init param signature

Made config optional and updated example