Cleaning up

Cleaned up the mess a bit
also added some setters for ArrayFilter
and updated the loop function