Unfortunately I couldn't get this to run :(
Concept sounds promising though if you can fix the bug before the deadline.