Refactor Credentials Issue #16