Fixed a few intermitted issues and improved the code behind the scenes.