Added solutions to numbers 4 and 5, cleaned up some errors

I’d already solved these, but I thought I’d record the solution
Removed main

Silly main…
Added some more things to ignore
Cleaned up code