Updated and merged with your updates.