Martingale methods in stochastic control