Improve compile script, fix reset and OTMB buttons, and cleanup formatting