Add some generic helper functions.
Move part of function definitions to corresponding libs.
Read filter value and interface from config file.