Fixed #99 and furrther optimizations of the code.