Bug fixes and final Dual mode implementation.