Added buttons, improved navigation code.