Reordered lifecycle events

Arranged the beforeCopy event to trigger before the copy event.
indentation / linting fixes.

fixed indentation and spacing
fixed linting errors
Merge pull request #6 from patricklodder/merge-pr4

Reorder lifecycle events and fix indentation / linting warnings