Don't be discouraged! You did great work here. Crazy bugs pop up in simple concepts all the time that make it hard to get stuff to do what you want, and schedules can be challenging. You should be proud that you created something to submit. Good work!