Completely redid logic system

Plugin wasn't even doing any logic, just really crappy math. Redid/Added
logic system to be correct, and work. Very sophisticated, very simple.
Piece of cake