Added $variables for substitution.
Added few tests.
split_button and media has been removed. It's useless.