Refined structure, tests for filters

Added unit tests for filters
Created some inner packages, moved Smtp out of package smtp