small optimisation of themis javascript (removed function calls and a couple of lines)