Fixed bug with double handlers for each component

Moved Persistence-specific methods to the bottom and added comments