more parameter fixing
clean up session constructor parameters
use bool where appropriate
remove more preprocessor and use stdint types