Refactored and commented common module