completed SOM homework, very bad things were done

Proper Software Engineering practices were not followed... hacky things
were done just to get it to work. If this was for anything but a
homework, I would go through and clean it up.