Tweaked a great deal and resolved a lot of little problems