Removed large amount of code

I rewrote the library.