Restructured into libs. Now both algorithms can be used in one main.