Tidied up CSS and added a few comments to make things clearer.