Started moving code out of .ino file and into Application.

Also converted some #defines over to static consts.