Refactor

-Refactored Solver
-Added comments to several classes
-Eliminated some warnings