Conversion and improvement of my A Level project from Delphi to C#