Solve problem 6
Solve problem 7
Solve problem 8
Move square to Common
Solve problem 9
Solve problem 10

I decided to use an external library for efficient prime calculation, rather than waste time duplicating that (relatively uninteresting) work.