organized javascript. Still confused.