Lots of updates

Moved entire project into an Immediately Invoked Function Expression.
Modified Update_Table to use new weighting algorithm