refactor

Refactor code following PastCare best practices and conventions