Merge #23: Refactoring code