Refactored class functions for consistency