Had to rewrite alot of things.  Logic was wrong in most places