Added __init__ function in base class to avoid code repetition
Merge pull request #9 from gnuman/code-refactor-pull-request

Added __init__ function in base class to avoid code repetition