Created button factory function.