strict mode; some small improvements
firefox fix