Solution: Factor the code into a different file with a well defined API and add unit tests.
Attach a file by drag & drop or click to upload