removing the add zero's that we being used for casting
removing the unnecessary filtering
removing static calls of non-static methods
making the boolean case consistent
removing duplicate parameter definition
tweaking the formatting
removing the old function in favor of a simple foreach
removing unused variable
adding quotes to make sure strings are considered strings instead of constants