Refactor/separate session

The session module was too complex and messing with different data types.

From now on session itself only deals with strings and all the calculations that depend on BigInteger live in calculate.