Rewrite to make it handle functions as conditions

Make it handle function conditions that can use object properties
for conditional checking.
Rewrite to make it use more built in jQuery functionality.
Remove elif() because it's too complicated at this point.