Cleaned up data code using filters