fixing SafeMap setter bug, cleaning up, general goodness