Condense code
More efficient JS