Refactor code structure. aka ruby the right inheritance way.