Rewrote library

Nearly rewrote whole library and included non-jquery verson. Major release