Made a few logic changes and catches for logical errors - Rhett