Organized JS into classes