fix filtering, added editing functions, remove most of undefined jquery problems