Add filters, fix die messages, move public functions to class.
Allow empty variables in functions.