rewrote code to be modular, catches most errors

code is easier to debug now as disabling parts of it was made possible
by rewriting the code to be function based. Will catch and display a
relevent error for most exceptions. Updated README.