Refactored for own package

Refactored for own package