Added support for basic filtering + misc cleaning