fixed an issue where a unit could be worth 30 credits not being added at...

... all.

I have also made the conversion of marks to 10 credits a little more compact.

Note:
The else statement after the if in firefox gets called even when the if statement is valid. I don't program in js so I don't know why this happens (Could be that its checking just y as a whole?).

Will need merging with main project and uploading to the website