Commenting source and adding window resize functionality