Begin refactoring of n queens program