Small changes
Structure as a plugin
Add handler for open event