Fix filtering and try to eliminate as much as possible the global usage of the kwargs variable.
- Remove unneeded language strings in the javascript file.
Few more tricks to save some code :)
Remove some more lang strings out of the javascript files and back into the HTML.
Also fix a couple of styling bugs.
- Fix some threading issues, should (almost) always use a scoped session when using sqlalchemy with a web framework.
- Clean up a couple of bits of code by removing some unneeded statements.
Merge pull request #117 from alexlatchford/fix-filtering

Fix filtering