More concise code

Instead of numbering the Size & RepeatModes and then switching on the number, why not set properties directly? Makes the code much simpler and eleganter, I think.
Merge pull request #1 from markmarijnissen/patch-1

I like your suggestion, it's much more flexible and clean this way, thanks!