Fixed filtering logic
Input sanitization
Closed #18