Attempt #1 at refactoring library (Check heading)