Move lib_filter to use autoloading

Also sets visibility on all variables and methods, because
that's a Good Thing.
Move expenses functions to autoloadable utility class
Move alert functions from script into utility class to meet PSR-1