Fix Exception in library. Closes #147.
fix bug with over 100% in the library.
Fix bug with date compare in library.