Project Euler testcases, and associated bugfixes