Compilable refactored library. Finished algorithm, and BitString implementation.