Moved inList function to header file, cleaned up solver code.