Added trim filter and fixed a bug with zero kwargs