Refactored to instances
Merge pull request #4 from mmmmmrob/refactor_to_instances

Refactored to instances