Fixed internal server error bug
Put filter fuunctions in seperate file