Fixed more bugs.  The application now tentatively works