On loaded event and closures

closes #7