Fixed style

- Private functions should be on top (recommended by jslint and others
- Private methods should be created with this.foo as that makes them
public
Merge remote-tracking branch 'origin/154-fix-animation-2' into next

* origin/154-fix-animation-2:
  Fixed style