Cleaned up styles and added comments to make it easy to understand code