Removed redundant dir check. Minor simplifications.