Added a  few UI tweaks and error checking