Start cleaning code
Issue #63
Use filters instead of rewriting core functions
Need test