Fix simulation and db_helper datatype errors, refactor pwrecovery.py
Merge remote-tracking branch 'origin/master'

Conflicts:
	sim/simulation.py