JS Logic

A lil logic cleanup