Trying to move into a cleaner JS structure