Begin implementation of depth first search solver