Javascript Fine-Tuning

Clean-up Javascript code and add comments
Fine-tuned page animations.