First pass at a solution to the assignment. May try on Sunday to improve if possible/needed.