Added Functions. Error Checking.