Implemented the essential control flow

Mostly everything except for the actual SVD has been implemented.