#54: Code refactoring