Thanks for the help so far. My current code is here: http://dpaste.dzfl.pl/b9acff399649 Are there problems with my code, or do you have suggestions to improve it?