changed a few things based on the PR feedback. Fixed failing tests.