Fixed bug where program crashed if week contained no numbers
Put weeks functionality in a function
Fixed typo
minor changes